<#include "/public/macro.html">
<link rel="stylesheet" href="/js/select/css/select2.min.css"/>	
<script src="/js/select/js/select2.min.js"></script>
<div class="ukefu-bt-text-content">
	<table class="layui-table" lay-skin="nob">
		<tbody>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">关键词：</td>
				<td width="20%"><input type="text" name="q" value="${q!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="查询条件" autocomplete="off" class="layui-input"></td>
				<td width="1%" nowrap="nowrap">操作人：</td>
				<td width="20%">
					<select id="userid" name="userid" lay-ignore style="width: 100%;">
					<#list userList as user>
				  	<option value="${userid!''}" <#if user.id == userid>selected="selected"</#if>>${user.username!}</option>
				  	</#list>
					</select>
				</td>
				<td width="1%" nowrap="nowrap">操作人员email：</td>
				<td width="20%"><input type="text" name="usermail" value="${usermail!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="操作人员的email" autocomplete="off" class="layui-input"></td>
				<td width="1%" nowrap="nowrap">局域网IP：</td>
				<td width="20%">
					<input type="text" name="reportname" value="${reportname!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="局域网IP" autocomplete="off" class="layui-input">
				</td>
			</tr>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">ip：</td>
				<td width="20%">
					<input type="text" name="ip" value="${ipp!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="ip" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">hostname：</td>
				<td width="20%">
					<input type="text" name="hostname" value="${hostnamee!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="hostname" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">sessionID：</td>
				<td width="20%">
					<input type="text" name="reportdic" value="${reportdic!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="sessionID" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">操作url：</td>
				<td width="20%">
				<input type="text" name="url" value="${url!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="操作url" autocomplete="off" class="layui-input">
				</td>
			</tr>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">传入参数：</td>
				<td width="20%">
					<input type="text" name="parameters" value="${parameters!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="传入参数" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">类名：</td>
				<td width="20%">
					<input type="text" name="classname" value="${classname!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="类名" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">方法名：</td>
				<td width="20%">
					<input type="text" name="methodname" value="${methodname!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="方法名" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">字段名：</td>
				<td width="20%">
				<input type="text" name="filename" value="${filename!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="字段名" autocomplete="off" class="layui-input">
				</td>
			</tr>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">行号：</td>
				<td width="20%">
					<input type="number" name="linenumber" value="${linenumber!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="行号" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">线程：</td>
				<td width="20%">
					<input type="text" name="throwable" value="${throwable!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="线程" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">方法类型：</td>
				<td width="20%">
					<input type="text" name="funtype" value="${funtype!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="方法类型" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">方法描述：</td>
				<td width="20%">
					<input type="text" name="fundesc" value="${fundesc!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="方法描述" autocomplete="off" class="layui-input">
				</td>
			</tr>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">触发预警服务：</td>
				<td width="20%">
					<select id="triggerwarning" name="triggerwarning" >
						<option value="">触发预警服务</option>
						<#list uKeFuDic['com.dic.reqlog.warnlv'] as warnlv>
							<optgroup label="${warnlv.name!''}">
								<#list warnlvList as warnlvv>
									<#if warnlvv.parentid==warnlv.id>
									<option value="${warnlvv.id!''}" <#if triggerwarning?? && triggerwarning==warnlvv.id>selected</#if>>${warnlvv.name!''}</option>
									</#if>
								</#list>
							</optgroup>
						</#list>
					</select>
				</td>
				<td width="1%" nowrap="nowrap">错误提示：</td>
				<td width="20%" >
					<input type="text" name="error" value="${error!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="错误提示" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap">请求耗时(ms)：</td>
				<td width="20%">
					<input type="number" name="querytimebegin" value="${querytimebegin!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="请求耗时范围" autocomplete="off" class="layui-input">
				</td>
				<td width="1%" nowrap="nowrap" style="text-align: center;">～</td>
				<td width="20%">
					<input type="number" name="querytimeend" value="${querytimeend!''}" style="height: 38px;line-height: 30px;margin-top: 10px;float:left;" placeholder="请求耗时范围" autocomplete="off" class="layui-input">
				</td>
				<!-- <td width="1%" nowrap="nowrap">登录或操作时间：</td>
				<td width="20%">
					<input name="starttimebegin" class="layui-input" placeholder="开始日期" value="${starttimebegin!''}" data-datetype="laydate" autocomplete="off">
				</td>
				<td width="1%" nowrap="nowrap" style="text-align: center;">～</td>
				<td width="20%">
					<input name="starttimeend" class="layui-input" placeholder="结束日期" value="${starttimeend!''}" data-datetype="laydate" autocomplete="off">
				</td> -->
			</tr>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">登录或操作时间：</td>
				<td width="20%">
					<input name="createdatebegin" class="layui-input" placeholder="开始日期" value="${createdatebegin!''}" data-datetype="laydate" autocomplete="off">
				</td>
				<td width="1%" nowrap="nowrap" style="text-align: center;">～</td>
				<td width="20%">
					<input name="createdateend" class="layui-input" placeholder="结束日期" value="${createdateend!''}" data-datetype="laydate" autocomplete="off">
				</td>
				<td width="1%" nowrap="nowrap">触发预警服务时间：</td>
				<td width="20%">
					<input name="triggertimebegin" class="layui-input" placeholder="开始日期" value="${triggertimebegin!''}" data-datetype="laydate" autocomplete="off">
				</td>
				<td width="1%" nowrap="nowrap" style="text-align: center;">～</td>
				<td width="20%">
					<input name="triggertimeend" class="layui-input" placeholder="结束日期" value="${triggertimeend!''}" data-datetype="laydate" autocomplete="off">
				</td>
			</tr>
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">退出时间：</td>
				<td width="20%">
					<input name="endtimebegin" class="layui-input" placeholder="开始日期" value="${endtimebegin!''}" data-datetype="laydate" autocomplete="off">
				</td>
				<td width="1%" nowrap="nowrap" style="text-align: center;">～</td>
				<td width="20%">
					<input name="endtimeend" class="layui-input" placeholder="结束日期" value="${endtimeend!''}" data-datetype="laydate" autocomplete="off">
				</td>
			</tr>
			<!-- <tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">创建时间：</td>
				<td width="20%">
					<input name="createdatebegin" class="layui-input" placeholder="开始日期" value="${createdatebegin!''}" data-datetype="laydate" autocomplete="off">
				</td>
				<td width="1%" nowrap="nowrap" style="text-align: center;">～</td>
				<td width="20%">
					<input name="createdateend" class="layui-input" placeholder="结束日期" value="${createdateend!''}" data-datetype="laydate" autocomplete="off">
				</td>
			</tr> -->
			
			
			<tr class="tdHasContorllor design-dropable-td">
				<td width="1%" nowrap="nowrap">
					<button class="layui-btn layui-btn-sm" type="submit">
						<i class="layui-icon">&#xe615;</i> 
						查询
					</button>
				</td>
			</tr>
		</tbody>
	</table>
</div>
<script>
//Demo
	$(function(){
		
		if($("#condition").val() == 'scope'){
			$(".temp2").show();
			$(".temp1").hide();
		}
		
		$("#userid").select2({
			language:'zh-CN',
			placeholder:"请选择操作人",
			ajax:{
				url:"/res/users.html",
				dataType: 'json',
				delay: 250,
				processResults: function (data, params) {
					return {
						results: data
					};
				}    
			}
		});
		
	});


	layui.use('form', function(){
	  var form = layui.form;
	  form.render(); //更新全部
	});
	layui.use(['element'], function(){
		var element = layui.element;
	});
	layui.use('laydate', function() {
		var laydate = layui.laydate;
	});
	layui.use(['layer', 'form'], function(){
	 
		var layer = layui.layer, form = layui.form;
			form.on('select(myselect)', function(data) {
				
				var actid = data.value;
	
				loadURL("/apps/callout/include/taskid?id=" + data.value, "#taskid",function(){
					form.render("select");
				});
				/* loadURL("/apps/callout/include/workstatus?id=" + data.value, "#workstatus",function(){
					form.render("select");
				}); */
			});
			form.on('select(condition)', function(data) {
				
				var con = data.value;
	
				if(con == 'scope'){
					$(".temp1").hide();
					$(".temp2").show();
				}else{
					$(".temp2").hide();
					$(".temp1").show();
				}
			});

	});
	/* layui.use(['layer', 'form'], function(){
	
	 
	var layer = layui.layer, form = layui.form;
		
		form.on('select(ownerdept)', function(data) {
			
			var organ = data.value;

			loadURL("/apps/callout/include/owneruser?id=" + data.value, "#owneruser",function(){
				form.render("select");
			});
		});

	}); */
	
	$(document).ready(function(){
		if($("#owneruser").length>0){
			$("#owneruser").select2({
				allowClear: true,
				language:'zh-CN',
				placeholder:"请选择坐席",
				ajax:{
					url:"/res/agent.html",
					dataType: 'json',
					delay: 250,
					processResults: function (data, params) {
						return {
							results: data
						};
					}    
				}
			});
		}
		if($("#ownerai").length>0){
			$("#ownerai").select2({
				allowClear: true,
				language:'zh-CN',
				placeholder:"请选择机器人"
			});
		} 
		if($("#ownerforecast").length>0){
			$("#ownerforecast").select2({
				allowClear: true,
				language:'zh-CN',
				placeholder:"请选择队列"
			});
		} 
		
		$(".ukefu-select").select2({minimumResultsForSearch: Infinity});
	});
</script>